package minijava;

import java.lang.Comparable;

public class Pair<T1, T2> implements Comparable{
    public T1 first;
    public T2 second;

    public Pair(T1 f, T2 s){
	first = f;
	second = s;
    }

    public int compareTo(Pair<T1, T2> p){
	int c = first.compareTo(p.first);
	if(c == 0)
	    return second.compareTo(p.second);
	return c;
    }
}
